package edu.sdwu.liqing.qasystem.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import edu.sdwu.liqing.qasystem.dto.QADto;
import edu.sdwu.liqing.qasystem.dto.QaQuestionDto;
import edu.sdwu.liqing.qasystem.entity.QaQuestion;
import com.baomidou.mybatisplus.extension.service.IService;
import edu.sdwu.liqing.qasystem.entity.QaUser;
import edu.sdwu.liqing.qasystem.vo.QaQuestionVo;

import java.util.List;

/**
 * <p>
 * 问题表  服务类
 * </p>
 *
 * @author liqing@sdwu.edu
 * @since 2020-03-22
 */
public interface IQaQuestionService extends IService<QaQuestion> {

    boolean save(QaQuestion question);

    boolean update(QaQuestion qaQuestion);

    boolean delete(String id);

    Page<QaQuestion> page(QaQuestionVo vo);

    QaQuestionDto get(String id);

    boolean saveQuestionAndAnswer(QADto dto);

    QaQuestion getByModuleId(String moduleId);

    Page<QaQuestion> currentPage(QaQuestionVo vo);

    boolean solved(String key);

    List<QaQuestion> list(String keyword);

}
